package observer1;

import java.util.Observable;

/**
 * @author Frank
 * @create 2018-11-16 17:11
 * @desc 描述
 **/
public class WeatherData extends Observable {

    private float temp;
    private float humid;
    private float pressure;

    public void measuredChanged() {
        setChanged();
        notifyObservers();
    }

    public void setMeasureMents(float temp, float humid, float pressure) {
        this.temp = temp;
        this.humid = humid;
        this.pressure = pressure;
        measuredChanged();
    }

    public float getTemp() {
        return temp;
    }

    public void setTemp(float temp) {
        this.temp = temp;
    }

    public float getHumid() {
        return humid;
    }

    public void setHumid(float humid) {
        this.humid = humid;
    }

    public float getPressure() {
        return pressure;
    }

    public void setPressure(float pressure) {
        this.pressure = pressure;
    }
}
